f = open("data.txt", "r", encoding="utf-8")

# 方式一  read方式
# content = f.read()
# print(content)


# 方式二  readline方式
# content = f.readline()
# while (content != ""):
#     print(content)
#     content = f.readline()

# 方式二  readlines方式
content = f.readlines()
for line in content:
    print(line)

f.close()